﻿using mvcForum.Web.Attributes;
using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace mvcForum.Web.ViewModels {

	public class RegisterModel {
		[Required]
		[LocalizedDisplay("MVCForum.Web.ViewModels.RegisterModel", "Username")]
		public String Username { get; set; }

		[Required]
		[DataType(DataType.EmailAddress)]
		[LocalizedDisplay("MVCForum.Web.ViewModels.RegisterModel", "EmailAddress")]
		public String EmailAddress { get; set; }

		[Required]
		//[ValidatePasswordLength]
		[DataType(DataType.Password)]
		[LocalizedDisplay("MVCForum.Web.ViewModels.RegisterModel", "Password")]
		public String Password { get; set; }

		[DataType(DataType.Password)]
		[LocalizedDisplay("MVCForum.Web.ViewModels.RegisterModel", "ConfirmPassword")]
		[System.Web.Mvc.Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
		public String ConfirmPassword { get; set; }

		public Boolean RulesAccepted { get; set; }

		public Boolean RequireRulesAccept { get; set; }
		public String SignUpRules { get; set; }
	}
}